// @ts-ignore
/* eslint-disable */
import request from '@/utils/request.ts'

/** 此处后端没有提供注释 POST /post/delete */
export async function delete1(body: API.DeleteRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponse>('/post/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /post/edit */
export async function edit(body: API.BizPost, options?: { [key: string]: any }) {
  return request<API.BaseResponse>('/post/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /post/getAuditedPostPageList */
export async function getAuditedPostPageList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getAuditedPostPageListParams,
  options?: { [key: string]: any }
) {
  return request<API.PageResponseBizPost>('/post/getAuditedPostPageList', {
    method: 'GET',
    params: {
      ...params,
      pageListVo: undefined,
      ...params['pageListVo'],
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /post/getUnauditedPostPageList */
export async function getUnauditedPostPageList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getUnauditedPostPageListParams,
  options?: { [key: string]: any }
) {
  return request<API.PageResponseBizPost>('/post/getUnauditedPostPageList', {
    method: 'GET',
    params: {
      ...params,
      pageListVo: undefined,
      ...params['pageListVo'],
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /post/publish */
export async function publish(body: API.BizPost, options?: { [key: string]: any }) {
  return request<API.BaseResponse>('/post/publish', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /post/reviewPost */
export async function reviewPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.reviewPostParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>('/post/reviewPost', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}
